const { exec } = require('child_process')
exports.cmd = (...args) => {
  return new Promise((resolve, reject) => {
    exec(...args, function(error, stdout, stderr) {
      if (error) {
        console.error('error: ' + error)
        return
      }
      //  输出开启的shell内输出的stdout输出流
      resolve()
    })
  })
}
